<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEmpresaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_id}" for="id" />
                    <h:inputText id="id" value="#{empresaController.selected.id}" title="#{bundle.CreateEmpresaTitle_id}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_nome}" for="nome" />
                    <h:inputText id="nome" value="#{empresaController.selected.nome}" title="#{bundle.CreateEmpresaTitle_nome}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_cnpj}" for="cnpj" />
                    <h:inputText id="cnpj" value="#{empresaController.selected.cnpj}" title="#{bundle.CreateEmpresaTitle_cnpj}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_emailInstitucional}" for="emailInstitucional" />
                    <h:inputText id="emailInstitucional" value="#{empresaController.selected.emailInstitucional}" title="#{bundle.CreateEmpresaTitle_emailInstitucional}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_rua}" for="rua" />
                    <h:inputText id="rua" value="#{empresaController.selected.rua}" title="#{bundle.CreateEmpresaTitle_rua}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_numero}" for="numero" />
                    <h:inputText id="numero" value="#{empresaController.selected.numero}" title="#{bundle.CreateEmpresaTitle_numero}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_cidade}" for="cidade" />
                    <h:inputText id="cidade" value="#{empresaController.selected.cidade}" title="#{bundle.CreateEmpresaTitle_cidade}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_uf}" for="uf" />
                    <h:inputText id="uf" value="#{empresaController.selected.uf}" title="#{bundle.CreateEmpresaTitle_uf}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_cep}" for="cep" />
                    <h:inputText id="cep" value="#{empresaController.selected.cep}" title="#{bundle.CreateEmpresaTitle_cep}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_complemento}" for="complemento" />
                    <h:inputText id="complemento" value="#{empresaController.selected.complemento}" title="#{bundle.CreateEmpresaTitle_complemento}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_telefoneInstitucional}" for="telefoneInstitucional" />
                    <h:inputText id="telefoneInstitucional" value="#{empresaController.selected.telefoneInstitucional}" title="#{bundle.CreateEmpresaTitle_telefoneInstitucional}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_bairro}" for="bairro" />
                    <h:inputText id="bairro" value="#{empresaController.selected.bairro}" title="#{bundle.CreateEmpresaTitle_bairro}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_ramoDeAtividade}" for="ramoDeAtividade" />
                    <h:inputText id="ramoDeAtividade" value="#{empresaController.selected.ramoDeAtividade}" title="#{bundle.CreateEmpresaTitle_ramoDeAtividade}" />
                    <h:outputLabel value="#{bundle.CreateEmpresaLabel_dataDeCadastro}" for="dataDeCadastro" />
                    <h:inputText id="dataDeCadastro" value="#{empresaController.selected.dataDeCadastro}" title="#{bundle.CreateEmpresaTitle_dataDeCadastro}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{empresaController.create}" value="#{bundle.CreateEmpresaSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{empresaController.prepareList}" value="#{bundle.CreateEmpresaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateEmpresaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
